@layout("/common/_container.html",{js:["/assets/modular/system/task/steerTask.js"]}){
<div class="layui-body-header">
    <span class="layui-body-header-title">添加</span>
</div>
<style>
    .btnshop {
        display: inline-block;
        height: 38px;
        line-height: 38px;
        padding: 0 18px;
        background-color: #009688;
        color: #fff;
        white-space: nowrap;
        text-align: center;
        font-size: 14px;
        border: none;
        border-radius: 2px;
        cursor: pointer;
        margin-bottom: 10px;
    }
    .sunRenting{
        margin-bottom: 10px;
    }
</style>
<div class="layui-fluid " style="">
    <div class="layui-card">
        <div class="layui-card-body">
            <form id="taskForm" lay-filter="taskForm" class="layui-form model-form"
                  style="max-width: 700px;margin: 40px auto;">
                <input name="id" id="proId" type="hidden"/>
                <div class="layui-form-item">
                    <label class="layui-form-label">网上建店</label>
                    <div class="layui-input-block">
                        <input type="button" class="btnshop" id="shop" value="网上建店"/>
                        <input type="button" class="btnshop" id="surMeal" value="线上套餐"/>
                        <input type="button" class="btnshop" id="queuing" lay-event="queuing" value="排队机"/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">营业执照</label>
                    <div class="layui-input-block">
                        <input type="hidden" name="wwztimg" id="wwztimg">
                        <div class="layui-upload">
                            <button type="button" class="layui-btn" id="many_wwztimg_upload_btn">上传营业执照</button>
                            <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
                                预览图：
                                <div class="layui-upload-list uploader-list" style="overflow: auto;"
                                     id="uploader-list-wwztimg"></div>
                            </blockquote>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">卫生许可证</label>
                    <div class="layui-input-block">
                        <input type="hidden" name="dgztimg" id="dgztimg">
                        <div class="layui-upload">
                            <button type="button" class="layui-btn" id="many_dgztimg_upload_btn">上传卫生许可证</button>
                            <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
                                预览图：
                                <div class="layui-upload-list uploader-list" style="overflow: auto;"
                                     id="uploader-list-dgztimg"></div>
                            </blockquote>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label name">配送要货</label>
                    <div class="layui-input-block">
                        <input id="distribution" name="distribution" placeholder="配送要货" type="text"
                               class="layui-input" readonly style="border: none;padding-top: 10px;"/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">开业时间</label>
                    <div class="layui-input-block">
                        <input id="openTime" name="openTime" placeholder="请选择时间" type="text" class="layui-input"/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label name">当地供货商</label>
                    <div class="layui-input-block">
                        <input id="supplier" name="supplier"  type="text"
                               class="layui-input" readonly style="border: none;padding-top: 10px;"/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label name">股份是否缴齐</label>
                    <div class="layui-input-block">
                        <input name="shares" value="未缴齐" readonly style="border: none;padding-top: 10px;">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label name">可乐机</label>
                    <div class="layui-input-block">
                        <input id="coke" name="coke" placeholder="可乐机" type="text" class="layui-input" readonly
                               style="border: none;"/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label name">收银系统</label>
                    <div class="layui-input-block div">
                        <input id="cashier" name="cashier" placeholder="收银系统" type="text" class="layui-input" readonly
                               style="border: none;"/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label name">法人身份证</label>
                    <div class="layui-input-block">
                        <input type="hidden" name="qtdmztimg" id="qtdmztimg">
                        <div class="layui-upload">
                            <button type="button" class="layui-btn" id="many_qtdmztimg_upload_btn">上传法人身份证</button>
                            <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
                                预览图：
                                <div class="layui-upload-list uploader-list" style="overflow: auto;"
                                     id="uploader-list-qtdmztimg"></div>
                            </blockquote>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label name">租房信息：</label>
                    <div class="layui-form-item">
                        <label class="layui-form-label name">日期</label>
                        <div class="layui-input-block sunRenting">
                            <input id="rentingData" name="rentingData" placeholder="请选择日期" type="text"
                                   autocomplete="off" class="layui-input"/>
                        </div>
                        <label class="layui-form-label name">价格</label>
                        <div class="layui-input-block  sunRenting">
                            <input id="prices" name="prices" placeholder="请输入价格" type="text" class="layui-input"
                                   autocomplete="off"/>
                        </div>
                        <label class="layui-form-label name">押金</label>
                        <div class="layui-input-block  sunRenting">
                            <input id="deposit" name="deposit" placeholder="请输入押金" type="text" class="layui-input"
                                   autocomplete="off"/>
                        </div>
                        <label class="layui-form-label name">面积</label>
                        <div class="layui-input-block sunRenting">
                            <input id="area" name="area" placeholder="请输入面积" type="text" class="layui-input"
                                   autocomplete="off"/>
                        </div>
                        <label class="layui-form-label name">地址</label>
                        <div class="layui-input-block sunRenting">
                            <input id="address" name="address" placeholder="请输入地址" type="text" class="layui-input"
                                   autocomplete="off"/>
                        </div>
                        <label class="layui-form-label sunRenting name">房东电话</label>
                        <div class="layui-input-block">
                            <input id="phone" name="phone" placeholder="请输入电话" type="text" class="layui-input"
                                   autocomplete="off"/>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label name" style="width: 100px;"></label>
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-filter="btnSubmit" lay-submit style="margin-bottom: 10px">
                            &emsp;提交&emsp;
                        </button>
                        <button class="layui-btn layui-btn-primary" type="button" id="backupPage"
                                style="margin-bottom: 10px">&emsp;返回&emsp;
                        </button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="application/javascript">
    const list = [${list}];
    $(function () {
        console.log(list);
        for (let i = 0; i < list[0][0].length; i++) {
            $(".name").each(function (o, e) {
                let name = list[0][0][i].name;
                if (name = $(e).html() && list[0][0][i].content != null && list[0][0][i].content != "") {
                    $(e).next().find('input').val(list[0][0][i].content);
                    $(e).next().find('input').attr("readonly", "true");
                }
                if (list[0][0][i].proId != undefined && list[0][0][i].proId != null) {
                    $("#proId").val(list[0][0][i].proId);
                }
            });
        }
    });
</script>
@}